package com.thoughtworks.opensource.yui.dd.client.events;

/**
 * Created by IntelliJ IDEA.
 * Author: C. K. Sidu Ponnappa
 * Date: Dec 15, 2006
 * Time: 11:52:35 PM
 * ThoughtWorks India Pvt. Ltd.
 */
public class Event {
    private EventType type;
    private Object source;
    private Object payload;

    public Event(EventType type, Object source, Object payload) {
        this.type = type;
        this.source = source;
        this.payload = payload;
    }

    public boolean is(EventType other) {
        return type.equals(other);
    }


    public Object getSource() {
        return source;
    }

    public Object getPayload() {
        return payload;
    }
}
